home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
C/C++ Users Group Library 1996 July
/
C-C++ Users Group Library July 1996.iso
/
listings
/
v_13_06
/
saks
/
armexmpl.h
< prev
next >
Wrap
C/C++ Source or Header
|
1995-04-06
|
531b
|
25 lines
Listing 1 - The example from the ARM limiting the
context sensitivity of class member declarations.
typedef int c;
enum { i = 1 };
class X
{
char v[i];
int f() { return sizeof(c); }
char c; // error: typedef name 'c'
// redefined after use
enum { i = 2; }; // error: constant 'i'
// redefined after use
};
typedef char *T;
struct Y
{
T a;
typedef long T; // error: T already defined
T b;
};